#include <stdio.h>

#define max(a,b,c) ((a>b?a:b)>c?(a>b?a:b):c)

double max0(double x,double y,double z)
{
	int max=x;
	max=max>y?max:y;
	max=max>z?max:z;
	return max;
}

int main()
{
	double x,y,z;
	scanf("%lf %lf %lf",&x,&y,&z);
	double max1=max0(x,y,z);
	double max2=max(x,y,z);
	printf("%.3lf\n%.3lf",max1,max2);
	return 0;
}